home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / UPDPlay.rexx < prev    next >
OS/2 REXX Batch file  |  1996-09-26  |  2KB  |  61 lines

  1. /*
  2.     $VER: UPDPlay.rexx 1.2 (27.11.93)
  3.  
  4.     Author:
  5.         Michael Böhnisch (billy@uni-paderborn.de)    (mb)
  6.         Matthias Scheler (tron@lyssa.pb.owl.de)        (ms)
  7.  
  8.     Function:
  9.         Filer  currently is not able to replay IFF 8SVX sound files
  10.         greater  than  the largest available chip memory block.  If
  11.         you  have  the  UPD sound demon running, this script is the
  12.         solution.
  13.  
  14.         Using  Filer,  simply  double-click  on  the sample file to
  15.         play.
  16.  
  17.         In version 1.2 of this scripts was claimed that UPD works
  18.         asyncron what is of course not true. This script and UPD
  19.         work completely syncron.
  20.  
  21.     Requires:
  22.         UPD  (© 1991-1993 Jonas Petersson & Absolut Software, rated
  23.         "freely  distributable  copyrighted",  no  shareware  fee).
  24.         Look for it on AmiNet.
  25.  
  26.     Call:
  27.         UPDPlay IFFFILE
  28.  
  29.     Example for "Filer.RC":
  30.         IFFDEF "8SVX","Rexx:UPDPlay.rexx %s"
  31.  
  32.     History:
  33.         26.07.93    1.0 Initial Release (mb)
  34.         26.11.93    1.1 Review for Filer 3.10 Gamma 2 (mb)
  35.         27.11.93    1.2 solved Deadlock situation (ms)
  36. */
  37.  
  38. OPTIONS RESULTS            /* aquire results            */
  39.  
  40. PARSE ARG IFFFile
  41.  
  42. /* -------------------------------------------------------------------- */
  43. /* get source directory name, append "/" if it is not a device name    */
  44. /* -------------------------------------------------------------------- */
  45.  
  46. SrcPath = PRAGMA('Directory')
  47.  
  48. IF RIGHT(SrcPath, 1) = ':' THEN
  49.   FileName = SrcPath || IFFFile
  50. ELSE
  51.   FileName = SrcPath || '/' || IFFFile
  52.  
  53. /* -------------------------------------------------------------------- */
  54.  
  55. IF SHOW('P', 'PLAY') THEN DO    /* Is UPD running?            */
  56.   ADDRESS PLAY FILE FileName    /* make UPD play the file        */
  57. END
  58. ELSE DO                /* UPD not running, inform user        */
  59.   SAY 'Error: Cannot play|'||FileName||'|UPD is not running!'
  60. END
  61.